import request from '/@/utils/request';

// 查询推广小程序平台列表
export function listPromotion(query?: Object) {
  return request({
    url: '/module/platform/promotion/list',
    method: 'get',
    params: query
  })
}

// 查询推广小程序平台详细
export function getPromotion(id?: number) {
  return request({
    url: '/module/platform/promotion/' + id,
    method: 'get'
  })
}

// 新增推广小程序平台
export function addPromotion(data?: Object) {
  return request({
    url: '/module/platform/promotion',
    method: 'post',
    data
  })
}

// 修改推广小程序平台
export function updatePromotion(data?: Object) {
  return request({
    url: '/module/platform/promotion',
    method: 'put',
    data
  })
}

// 删除推广小程序平台
export function delPromotion(id?: number) {
  return request({
    url: '/module/platform/promotion/' + id,
    method: 'delete'
  })
}

// 导出推广小程序平台
export function exportPromotion(query?: Object) {
  return request({
    url: '/module/platform/promotion/export',
    method: 'get',
    params: query
  })
}

// 重置二维码
/*export function resetQrCode(data?: Object) {
  return request({
    url: '/module/platform/promotion/resetQrCode',
    method: 'post',
    data: data
  })
}*/
